<template>
	<view class="content" style="background-color: #f5f5f5;">
		<u-navbar scrollable=false titleStyle="font-size:40rpx;color:#333" :placeholder='true' title="修改密码"
			:autoBack="true">
		</u-navbar>
		<view class="input">
			<view class="title co3 fontS32">请输入6位数支付密码</view>
			<view class="code">
				<u-code-input @finish="finish()"  v-model="value" :maxlength="6" dot></u-code-input>
			</view>
		</view>
	</view>
</template>



<script>
	export default {
		data() {
			return {
				value: '',
				show: false,
				type:3,
			}
		},
		onLoad(op) {
				this.type=op.type
		},
		methods: {
			go() {
				console.log(12313);
			},
			finish(){
				let data={type:this.type,old_pay_pwd:this.value}
				this.$my.post('/index/user/check_old_pwd',data).then(res=>{
					this.$my.toast(res.message)
					if(res.code==200){
						this.$my.go('/pages/my/set/changePassword?data='+ JSON.stringify(data),500)
					}
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.content {
		.input {
			height: 100rpx;
			// background-color: tomato;
			margin-top: 200rpx;

			.title {
				// background-color: red;
				text-align: center;
			}

			.code {
				margin-top: 54rpx;
				display: flex;
				justify-content: center;
			}

		}
	}
</style>

